using System.Collections;
using System.Xml;
using Altova.TypeInfo;
using Altova.Xml;
using Altova.Xml.Meta;
using RDML_v1_2_REC.xs;

namespace RDML_v1_2_REC.rdml
{
	public class sampleType : TypeBase
	{
		internal class Enumerator : EnumeratorBase
		{
			public override object Current
			{
				get
				{
					return new sampleType((XmlNode)base.InnerCurrent);
				}
			}

			public Enumerator(IEnumerator inner)
				: base(inner)
			{
			}
		}

		public class MemberAttribute_id
		{
			private TypeBase owner;

			private MemberInfo info;

			public string Value
			{
				get
				{
					return XmlTreeOperations.CastToString(XmlTreeOperations.FindAttribute(owner.Node, info), info);
				}
				set
				{
					XmlTreeOperations.SetValue(owner.Node, info, value);
				}
			}

			public Attribute Info
			{
				get
				{
					return new Attribute(info);
				}
			}

			public MemberAttribute_id(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public bool Exists()
			{
				return owner.GetAttribute(info) != null;
			}

			public void Remove()
			{
				owner.RemoveAttribute(info);
			}
		}

		public class MemberElement_description : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public stringType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public stringType First
			{
				get
				{
					return new stringType(owner.GetElementFirst(info));
				}
			}

			public stringType Last
			{
				get
				{
					return new stringType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_description(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public stringType At(int index)
			{
				return new stringType(owner.GetElementAt(info, index));
			}

			public stringType Append()
			{
				return new stringType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new stringType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_documentation : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public idReferencesType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public idReferencesType First
			{
				get
				{
					return new idReferencesType(owner.GetElementFirst(info));
				}
			}

			public idReferencesType Last
			{
				get
				{
					return new idReferencesType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_documentation(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public idReferencesType At(int index)
			{
				return new idReferencesType(owner.GetElementAt(info, index));
			}

			public idReferencesType Append()
			{
				return new idReferencesType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new idReferencesType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_xRef : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public xRefType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public xRefType First
			{
				get
				{
					return new xRefType(owner.GetElementFirst(info));
				}
			}

			public xRefType Last
			{
				get
				{
					return new xRefType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_xRef(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public xRefType At(int index)
			{
				return new xRefType(owner.GetElementAt(info, index));
			}

			public xRefType Append()
			{
				return new xRefType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new xRefType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_annotation : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public annotationType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public annotationType First
			{
				get
				{
					return new annotationType(owner.GetElementFirst(info));
				}
			}

			public annotationType Last
			{
				get
				{
					return new annotationType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_annotation(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public annotationType At(int index)
			{
				return new annotationType(owner.GetElementAt(info, index));
			}

			public annotationType Append()
			{
				return new annotationType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new annotationType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_type2 : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public sampleTypeTypeType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public sampleTypeTypeType First
			{
				get
				{
					return new sampleTypeTypeType(owner.GetElementFirst(info));
				}
			}

			public sampleTypeTypeType Last
			{
				get
				{
					return new sampleTypeTypeType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_type2(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public sampleTypeTypeType At(int index)
			{
				return new sampleTypeTypeType(owner.GetElementAt(info, index));
			}

			public sampleTypeTypeType Append()
			{
				return new sampleTypeTypeType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new sampleTypeTypeType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_interRunCalibrator : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public booleanType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public booleanType First
			{
				get
				{
					return new booleanType(owner.GetElementFirst(info));
				}
			}

			public booleanType Last
			{
				get
				{
					return new booleanType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_interRunCalibrator(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public booleanType At(int index)
			{
				return new booleanType(owner.GetElementAt(info, index));
			}

			public booleanType Append()
			{
				return new booleanType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new booleanType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_quantity : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public quantityType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public quantityType First
			{
				get
				{
					return new quantityType(owner.GetElementFirst(info));
				}
			}

			public quantityType Last
			{
				get
				{
					return new quantityType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_quantity(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public quantityType At(int index)
			{
				return new quantityType(owner.GetElementAt(info, index));
			}

			public quantityType Append()
			{
				return new quantityType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new quantityType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_calibratorSample : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public booleanType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public booleanType First
			{
				get
				{
					return new booleanType(owner.GetElementFirst(info));
				}
			}

			public booleanType Last
			{
				get
				{
					return new booleanType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_calibratorSample(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public booleanType At(int index)
			{
				return new booleanType(owner.GetElementAt(info, index));
			}

			public booleanType Append()
			{
				return new booleanType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new booleanType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_cdnaSynthesisMethod : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public cdnaSynthesisMethodType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public cdnaSynthesisMethodType First
			{
				get
				{
					return new cdnaSynthesisMethodType(owner.GetElementFirst(info));
				}
			}

			public cdnaSynthesisMethodType Last
			{
				get
				{
					return new cdnaSynthesisMethodType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_cdnaSynthesisMethod(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public cdnaSynthesisMethodType At(int index)
			{
				return new cdnaSynthesisMethodType(owner.GetElementAt(info, index));
			}

			public cdnaSynthesisMethodType Append()
			{
				return new cdnaSynthesisMethodType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new cdnaSynthesisMethodType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_templateQuantity : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public templateQuantityType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public templateQuantityType First
			{
				get
				{
					return new templateQuantityType(owner.GetElementFirst(info));
				}
			}

			public templateQuantityType Last
			{
				get
				{
					return new templateQuantityType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_templateQuantity(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public templateQuantityType At(int index)
			{
				return new templateQuantityType(owner.GetElementAt(info, index));
			}

			public templateQuantityType Append()
			{
				return new templateQuantityType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new templateQuantityType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public MemberAttribute_id id;

		public MemberElement_description description;

		public MemberElement_documentation documentation;

		public MemberElement_xRef xRef;

		public MemberElement_annotation annotation;

		public MemberElement_type2 type2;

		public MemberElement_interRunCalibrator interRunCalibrator;

		public MemberElement_quantity quantity;

		public MemberElement_calibratorSample calibratorSample;

		public MemberElement_cdnaSynthesisMethod cdnaSynthesisMethod;

		public MemberElement_templateQuantity templateQuantity;

		public static ComplexType StaticInfo
		{
			get
			{
				return new ComplexType(RDML_v1_2_REC_TypeInfo.binder.Types[RDML_v1_2_REC_TypeInfo._altova_ti_rdml_altova_sampleType]);
			}
		}

		public sampleType(XmlNode init)
			: base(init)
		{
			instantiateMembers();
		}

		private void instantiateMembers()
		{
			id = new MemberAttribute_id(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_id]);
			description = new MemberElement_description(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_description]);
			documentation = new MemberElement_documentation(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_documentation]);
			xRef = new MemberElement_xRef(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_xRef]);
			annotation = new MemberElement_annotation(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_annotation]);
			type2 = new MemberElement_type2(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_type2]);
			interRunCalibrator = new MemberElement_interRunCalibrator(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_interRunCalibrator]);
			quantity = new MemberElement_quantity(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_quantity]);
			calibratorSample = new MemberElement_calibratorSample(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_calibratorSample]);
			cdnaSynthesisMethod = new MemberElement_cdnaSynthesisMethod(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_cdnaSynthesisMethod]);
			templateQuantity = new MemberElement_templateQuantity(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_sampleType_altova_templateQuantity]);
		}

		public void SetXsiType()
		{
			XmlTreeOperations.SetAttribute(base.Node, "xsi:type", "http://www.w3.org/2001/XMLSchema-instance", new XmlQualifiedName("sampleType", "http://www.rdml.org"));
		}
	}
}
